package com.prototype.client.managed.ui;

import com.google.gwt.requestfactory.ui.client.ProxyRenderer;
import com.prototype.client.managed.request.WorkServiceProxy;
import com.prototype.shared.domain.WorkStatusType;
import com.prototype.shared.domain.WorkType;

public class WorkServiceProxyRenderer extends ProxyRenderer<WorkServiceProxy> {

    private static com.prototype.client.managed.ui.WorkServiceProxyRenderer INSTANCE;

    protected WorkServiceProxyRenderer() {
        super(new String[] { "workName" });
    }

    public static com.prototype.client.managed.ui.WorkServiceProxyRenderer instance() {
        if (INSTANCE == null) {
            INSTANCE = new WorkServiceProxyRenderer();
        }
        return INSTANCE;
    }

    public String render(WorkServiceProxy object) {
        if (object == null) {
            return "";
        }
        return object.getWorkName() + " (" + object.getId() + ")";
    }
}
